import Mock from 'mockjs';
export default {
  'GET /api/placeHolder/query': (req, res) => {
    let data = Mock.mock({
      result: true,
      msg: null,
      data: [
        {
          msg: '报文name',
          name: '$(title)',
          id: 1,
        },
        {
          msg: 'suId',
          name: '$(suId)',
          id: 2,
        },
        {
          msg: '子设备',
          name: '$(deviceId)',
          id: 3,
        },
        {
          msg: '信号点编号',
          name: '$(spId)',
          id: 4,
        },
        {
          msg: '信号点名称',
          name: '$(spName)',
          id: 5,
        },
        {
          msg: '信号点类型',
          name: '$(spTypeId)',
          id: 6,
        },
        {
          msg: '信号点类型名称',
          name: '$(spTypeName)',
          id: 7,
        },
        {
          msg: 'ip',
          name: '$(ip)',
          id: 8,
        },
        {
          msg: '端口',
          name: '$(port)',
          id: 9,
        },
        {
          msg: '供应商',
          name: '$(vendor)',
          id: 10,
        },
        {
          msg: '模式',
          name: '$(model)',
          id: 11,
        },
        {
          msg: '硬件版本',
          name: '$(hardVersion)',
          id: 12,
        },
        {
          msg: '软件版本',
          name: '$(softVersion)',
          id: 13,
        },
        {
          msg: '报告时间',
          name: '$(reportTime)',
          id: 14,
        },
        {
          msg: '值',
          name: '$(value)',
          id: 15,
        },
        {
          msg: '告警描述',
          name: '$(alarmFriDesc)',
          id: 16,
        },
        {
          msg: '告警触发值',
          name: '$(triggerVal)',
          id: 17,
        },
        {
          msg: '告警等级',
          name: '$(alarmLevel)',
          id: 18,
        },
        {
          msg: '告警结束时间',
          name: '$(endTime)',
          id: 19,
        },
        {
          msg: '告警序号',
          name: '$(seriaNo)',
          id: 20,
        },
        {
          msg: '告警描述',
          name: '$(alarmDesc)',
          id: 21,
        },
        {
          msg: '告警开始时间',
          name: '$(startTime)',
          id: 22,
        },
        {
          msg: '响应结果',
          name: '$(result)',
          id: 23,
        },
        {
          msg: '错误编号',
          name: '$(failureCode)',
          id: 24,
        },
        {
          msg: '错误原因',
          name: '$(failureCause)',
          id: 25,
        },
        {
          msg: '错误序号',
          name: '$(failureSerialNo)',
          id: 26,
        },
        {
          msg: 'sc采集地址',
          name: '$(scAddress)',
          id: 27,
        },
        {
          msg: 'sc返回的错误码序号',
          name: '$(scSerialNo)',
          id: 28,
        },
        {
          msg: 'ftp用户名',
          name: '$(ftpUsername)',
          id: 29,
        },
        {
          msg: 'ftp密码',
          name: '$(ftpPassword)',
          id: 30,
        },
      ],
      errorCode: null,
    });
    res.send(data);
  },
  'GET /api/custom/all/:id': (req, res) => {
    let data = Mock.mock({
      result: true,
      msg: null,
      'data|6': [
        {
          'id|+1': 1,
          name: '@cname',
          code: '101',
          requestXml:
            '<html style="color:green"><!--thisisacomment--><head><title>HTMLExample</title></head><body>Theindentationtriestobe<em>somewhat&quot;dowhatImean&quot;</em>...butmightnotmatchyourstyle.</body></html>',
          responseXml:
            '<html style="color:green"><!--thisisacomment--><head><title>HTMLExample</title></head><body>Theindentationtriestobe<em>somewhat&quot;dowhatImean&quot;</em>...butmightnotmatchyourstyle.</body></html>',
          fsuTypeId: null,
          createTime: '2020-02-26 09:01:24',
          updateTime: '2020-02-26 09:09:04',
        },
      ],
      errorCode: null,
    });
    res.send(data);
  },
  'GET /api/custom/current/:id': (req, res) => {
    let data = Mock.mock({
      result: true,
      msg: null,
      data: {
        'id|+1': 1,
        name: '@cname',
        code: '101',
        requestXml:
          '<html style="color:green"><!--thisisacomment--><head><title>HTMLExample</title></head><body>Theindentationtriestobe<em>somewhat&quot;dowhatImean&quot;</em>...butmightnotmatchyourstyle.</body></html>',
        responseXml:
          '<html style="color:green"><!--thisisacomment--><head><title>HTMLExample</title></head><body>Theindentationtriestobe<em>somewhat&quot;dowhatImean&quot;</em>...butmightnotmatchyourstyle.</body></html>',
        fsuTypeId: null,
        createTime: '2020-02-26 09:01:24',
        updateTime: '2020-02-26 09:09:04',
      },
      errorCode: null,
    });
    res.send(data);
  },
  'POST /api/custom/delete': (req, res) => {
    res.send({
      result: true,
      msg: null,
      data: null,
      errorCode: null,
    });
  },
  'POST /api/custom/add': (req, res) => {
    res.send({
      result: true,
      msg: null,
      data: null,
      errorCode: null,
    });
  },
  'POST /api/custom/update': (req, res) => {
    res.send({
      result: true,
      msg: null,
      data: null,
      errorCode: null,
    });
  },
};
